﻿<%@ Page Title="" Language="C#" MasterPageFile="~/orderPageNav.master" AutoEventWireup="true" CodeBehind="selectorder.aspx.cs" Inherits="NotebookPortal.selectorder" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <table class="dxflInternalEditorTable">
        <tr>
            <td style="width: 39px">
    <dx:ASPxLabel ID="lblDraftOrder" runat="server" Text="Order#:"></dx:ASPxLabel></td>
            <td style="width: 88px">
                <dx:ASPxTextBox ID="txtDraftSONum" runat="server" Width="170px" ReadOnly="True">
                </dx:ASPxTextBox>
            </td>
            <td style="width: 100%">&nbsp;</td>
        </tr>
        <tr>
            <td style="width: 39px">
                <dx:ASPxLabel ID="ASPxLabel7" runat="server" Text="Warehouse:">
                </dx:ASPxLabel>
            </td>
            <td style="width: 88px">
                <dx:ASPxComboBox ID="cboWarehouse" runat="server" ValueType="System.String">
                </dx:ASPxComboBox>
            </td>
            <td style="width: 100%">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 39px">
                <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="Price List:" Width="80px">
                </dx:ASPxLabel>
            </td>
            <td style="width: 88px">
                <dx:ASPxComboBox ID="ASPxComboBox1" runat="server" ValueType="System.String">
                </dx:ASPxComboBox>
            </td>
            <td style="width: 100%">
                <dx:ASPxButton ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" Text="View Available Stocks">
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
    <br />
     <dx:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" 
        KeyFieldName="LotNumber" PreviewFieldName="ItemImage" Width="100%" EnableRowsCache="False" Theme="DevEx" AutoGenerateColumns="False" EnableTheming="True">
        <Columns>
            <dx:GridViewDataColumn FieldName="ItemCode" VisibleIndex="0" Caption="Item Code" />
            <dx:GridViewDataColumn FieldName="ItemName" VisibleIndex="1" Caption="Item Name" />
            <dx:GridViewDataTextColumn FieldName="LotNumber" Visible="False" VisibleIndex="3">
            </dx:GridViewDataTextColumn>
        </Columns>
        <Templates>
            <PreviewRow>
                <dx:ASPxBinaryImage ID="ASPxBinaryImage1" runat="server" Value='<%# Eval("ItemImage") %>' />
                <div id="TableItemProps" style="position: relative; float: left">
                <table>
                    <tr>
                        <td style="vertical-align: top">
                            &nbsp;</td>
                        <td style="vertical-align: top">
                            &nbsp;</td>
                        <td style="vertical-align: top">&nbsp;</td>
                    </tr>

                    <tr>
                        <td style="vertical-align: top">
                            <dx:ASPxLabel ID="ASPxLabel5" runat="server" style="font-weight: 700" Text="Lot#:">
                            </dx:ASPxLabel>
                        </td>
                        <td style="vertical-align: top">
                            <dx:ASPxLabel ID="lblLotNumber" runat="server" Text='<%# Eval("LotNumber") %>' />
                        </td>
                        <td style="vertical-align: top">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top">
                            <dx:ASPxLabel ID="ASPxLabel4" runat="server" Text="Available Stocks:" style="font-weight: 700">
                            </dx:ASPxLabel>
                        </td>
                        <td style="vertical-align: top">
                            <dx:ASPxLabel ID="lblAvailableStocks" runat="server" Text='<%# Eval("Qty") + " " + Eval("UoM") %>' />
                        </td>
                        <td style="vertical-align: top">
                            <dx:ASPxLabel ID="lblUoM" runat="server" Text='<%# Eval("UoM") %>' Visible="False">
                            </dx:ASPxLabel>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top">
                            <dx:ASPxLabel ID="ASPxLabel6" runat="server" style="font-weight: 700" Text="Unit Price:">
                            </dx:ASPxLabel>
                        </td>
                        <td style="vertical-align: top">
                            <dx:ASPxLabel ID="lblUnitPrice" runat="server" Text='<%# Eval("UnitPrice") %>'>
                            </dx:ASPxLabel>
                        </td>
                        <td style="vertical-align: top">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top">&nbsp;</td>
                        <td style="vertical-align: top">
                            <dx:ASPxCheckBox ID="chkIsFree" runat="server" CheckState="Unchecked" Text="Free" Value='<%# Eval("IsFree") %>'>
                            </dx:ASPxCheckBox>
                        </td>
                        <td style="vertical-align: top">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top">
                            <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="Qty Order:" style="font-weight: 700" />
                        </td>
                        <td style="vertical-align: top" colspan="2">
                            <dx:ASPxButtonEdit ID="txtOrderQty" runat="server" OnButtonClick="txtOrderQty_ButtonClick" Width="300px">
                                <Buttons>
                                    <dx:EditButton>
                                        <Image Url="~/images/add2cart.png">
                                        </Image>
                                    </dx:EditButton>
                                </Buttons>
                            </dx:ASPxButtonEdit>
                        </td>
                    </tr>

                </table>
                </div>
            </PreviewRow>
        </Templates>
        <Settings ShowPreview="true" />
        <SettingsPager PageSize="3" />
    </dx:ASPxGridView>
    </asp:Content>
